/**
 * Created by IntelliJ IDEA.
 * User: ryan
 * Date: Nov 3, 2010
 * Time: 11:52:04 AM
 * To change this template use File | Settings | File Templates.
 */
var timeline = timeline || {};

timeline.parseRequestedDate = function(url) {
	var match = /\?(.+)?$/.exec(url);
	if (match) {
		var date = unescape(match[1]);
        date = date.replace(/_/g," ");
        var resultDate = Date.parse(date);
        if (!resultDate) {
            resultDate = new Date(date);
        }
		return resultDate;
	} else {
		return null;
	}
}